import VueRouter from 'vue-router';

//导入路由组件
import homeContainer from './conponent/tabar/homeContainer.vue';
import member from './conponent/tabar/memberContainer.vue';
import search from './conponent/tabar/searchContainer.vue';
import shopcar from './conponent/tabar/shopcarContainer.vue';
import newsList from './conponent/news/newslist.vue';
import newsInfo from './conponent/news/newsinfo.vue';
import photolist from './conponent/photo/photolist.vue';
// 3. 创建路由对象
var router = new VueRouter({
  routes: [
    {path:'/',redirect:'/home'},
    {path:'/home',component:homeContainer},
    {path:'/member',component:member},
    {path:'/search',component:search},
    {path:'/shopcar',component:shopcar}, 
    {path:'/home/newslist',component:newsList},
    {path:'/home/newsInfo/:id',component:newsInfo},  
    {path:'/home/photoList',component:photolist}, 
  ],
  linkActiveClass:'mui-active'
})

// 把路由对象暴露出去
export default router